﻿namespace NanoMvvm
{
    public class WorkspaceSelectionItemViewModel<T> : SelectionItemViewModel<T> where T : class, IWorkspace
    {
        internal WorkspaceSelectionItemViewModel(SelectionViewModel<T> parent, T item) : base(parent, item)
        {
        }

        protected override void OnSelection()
        {
            Item.Activate();
        }

        protected override bool OnDeselection()
        {
            return Item.Deactivate();
        }
    }
}